package org.fuys.coder.infrastructure.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.fuys.coder.infrastructure.model.dto.SubstanceAuthorDTO;
import org.fuys.coder.infrastructure.model.dto.SubstanceDTO;

import org.fuys.coder.infrastructure.model.dto.SubstanceDataStatusDTO;
import org.fuys.coder.infrastructure.model.dto.SubstanceFileDTO;
import org.fuys.coder.infrastructure.model.po.Substance;

import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.infrastructure.dao
 * @className: SubstanceMapper
 * @author: WangJing
 * @description: 内容持久层Mapper接口
 * @date: 2024/6/25 18:20
 * @version: 1.0
 */
@Mapper
public interface SubstanceMapper extends BaseMapper<Substance> {
    List<SubstanceDTO> getWithCategories(Collection<Integer> ids, int substanceSize);

    List<SubstanceFileDTO> selectSubstanceWithFileIds(Long substanceId);

    SubstanceAuthorDTO getSubstanceAndAuthorIntro(Long substanceId);

    List<SubstanceDTO> getWithAfterTime(Date dateBeforeCur, Integer hotSelectNum);

    SubstanceDataStatusDTO getSubstanceDataStatus(Long substanceId, Integer userId);

}
